package config

import (
	"github.com/stretchr/testify/assert"
	"testing"
)

func TestNewWebhookConfig(t *testing.T) {

	tests := []struct {
		name     string
		wantFunc func(t *testing.T, i ...interface{})
	}{
		{
			name: "create webhook config",
			wantFunc: func(t *testing.T, i ...interface{}) {
				whc, err := NewWebhookConfig()
				if err != nil {
					t.Error(err)
				}
				assert.Equal(t, 17773, whc.HTTPPort)
			},
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			tt.wantFunc(t)
		})
	}
}
